import React from 'react'
import { Route, Redirect } from 'react-router-dom'
/**
 * 鉴权路由组件
 * @param {*} props 
 * auth，当前页面需要鉴权
 * @returns 
 */
export default function AuthRoute(props) {
    const loginStatus = true;
    if (props.auth && loginStatus) {
        return <Route  {...props}/>
    } else {
        return <Redirect to={{ pathname: "/login" }} />
    }
}
